Xbasic

INET::FTPReceiveStringData Method

Syntax

.ReceiveStringData as L (BYREF Data as C, SourceFile as C)

Arguments

DataCharacter

The data received.

SourceFileCharacter

The source file name.

Returns

resultLogical

Returns .t. if the operation succeed. Otherwise, returns .f.. If an error occurred, the INET::FTP CallResult property will contain more information.

Description

Receive the contents of a server file into a text buffer.

Example

dim ftp as INET::FTP
ftp.UserName   = "Fred"
ftp.Password   = "Secret"
ftp.EnableSSL  = .t.
ftp.Host       = "ftp.myserver.com"
ftp.UsePassive = .t.

dim Data as C
if ftp.ReceiveString(Data,"source.csv") <> .t.
    ' error
    msg = ftp.callResult.error
    ...
end if